moved output file class around
init in constructor