Minor modification
Fix file output bug