sort out logging to console