Checking if file exists before deletion