removing the wrong characters on file safe