bug fix

write log method modification