Adding a load of logging stuff to help diagnose issues on other machines