fix(pipe) if error when write to file -> exeption