Renaming file upon error, encoding URL in the filename does not work, browser decodes it.