Started on logging
Should be collecting data
Respect user preferences and don't break for current users
Added code to finish logging
Added checks to nto run finnish loggin unles the function exists