escape error str for files