Move log out of class