Fix cannot create log file at more than two levels deep direcotry.