Realized rows and colums in header where inverted in write fuction. Ahhhhh! Fixed. Output.ppm is now created!