Add logging to PUT for logfiles
Catch exceptions when writin logfile