fix fatal error log path issue; add lastRouter config;

fix fatal error log path issue; add lastRouter config;
code optimize