add logger module, but logger has bugs: if logfile is not exist, file mod error