[Incomplete] Use logger to print errors