fixed bug logging