Added better logging and error handling, preparing to introduce integrated webapp
Actually committing the logging instance initialiser.