Handled the case when the uploaded file is delete after upload