prevent crash when uploading files with % in filename