Enhanced Write method in Logger