fix bug when attribute logfile is nil