Fix for s3 file deletion