file upload and deleting fixes