Update writeLP to use printf
Finished writeLP