clean up file after inserting into db