move all logging to one place