Cancellation of EP

Dear Gravitas

My employment pass is valid till 19th of June 2019, The HR of my current company has filed for the Tax clearance.

My return ticket is on the 13th of June 2019. Should the Employment Pass be cancelled before i go out of the country on 13th June 2019 or should it be done after i exit the country by the employer?

Will i have problems in the immigration while leaving the country?

Also i only have 1 last page left out in my passport, should i get it renewed in Malaysia itself (in other words, if cancellation is required before i exit Malaysia, do they need pages to stamp the cancellation?)

If it has to be cancelled, how many days iw ill have before i leave the country. My Tax clearance is expected on 12th of June 2019 and my tickets are booked for 13th of june 2019.

Appreciate your response

Dear Gravitas, can i request your comment on my above question? this is urgent as in case of cancellation required before my exit, i will have to get a new passport and tehre will be quite a few things to complete with little time.