cleaned up file uploading