fixed issue with api logging