fix bug in file creating for logger