Using the logger to output error