properly delete file in case of errors in StoredFile.create