Fixes #79: replaced printf with LOG_CRITICAL

I think I've done everything right here. Let me know if I've missed something.