New logging method and output file switch