abstracted expressjs res. added tmp file cleanup when res is sent