Fix file in/out. More output parsing