entry mode detection improved

try to detect major mode using auto-mode-alist when file has not been
opened at all.
entry verification

to remove the stale entries when project is opened