file output fixed