Replaced all screen output to logging