Added file output class and file output handling