cleanup uploaded file if not moved
re-factor variable names to reflect their function