Changed logging to (hopefully) work with screen