printlns and thread-local-based code changes