fixed bug in log exception