improve logger class close #6 , close #7
now can be dump to file at runtime