Use logger to print errors