Fixed writing of outpuyt file
Trying #51
Trying #51