Add exception logging to file (should have read the docs and done this ages ago)