path_to_output cleanup