move logging into main