added logging of more critical info on api.
fixed merge issue