revised email upload file cleanup