Another try. Fixed writeOut() so it writes the first satic line.