Use debug module instead of console logging