Correct error logging

@marshall @jcappaert