Escaping single quotes for DB insert
Removing tmp output