Add Logging to file

Now uses ASYNC file append
Handles (some) errors tidily.
Logging directory kept as configurable (EG I don't want to log into the
cloned git repository!)