defer logger to print for better scalability