decomposed function for writing line to file, works on items table
added writeLine to categories
appears to be working, stopped to watch master chef junior