Fix notice "undefine index of logfile".