raise an error if the file failed to copy to public storage