move logging into separate class