Fix an exception when for whatever reason a new file for the revert query could not be created