Added error logging (this really should not happen, ever)