started update of logging output, eventually want to move to a logging system based on syslog, but just tidying up now