anchor.diff:      case TabFile of 
   	none -> 
   	    case lists:keysearch(Key, 1, ASTs) of
  -		{value, {Key, {AnnAST, Info, FileModifiedTime}}} ->
  -		    case FileModifiedTime >= filelib:last_modified(FileName) of
  +		{value, {Key, {AnnAST, Info, Checksum}}} ->
  +                    NewChecksum = filehash(FileName),
  +		    case (Checksum =:= NewChecksum) andalso (NewCheckSum=/=0) of
   			true -> 
  -			    log_errors(FileName, Info), {{ok, {AnnAST, Info}}, State};
  +			    log_errors(FileName, Info),
  +                            {{ok, {AnnAST, Info}}, State};
   			false ->
   			    {ok, {AnnAST1, Info1}} = refac_util:parse_annotate_file_1(FileName, ByPassPreP, SearchPaths, TabWidth, FileFormat),
   			    log_errors(FileName, Info1),
  -			    {{ok, {AnnAST1, Info1}}, #state{asts=lists:keyreplace(Key, 1, ASTs, {Key, {AnnAST1, Info1, filelib:last_modified(FileName)}})}}
  +			    {{ok, {AnnAST1, Info1}}, #state{asts=lists:keyreplace(Key, 1, ASTs, {Key, {AnnAST1, Info1, NewChecksum}})}}
   		    end;
   		false ->
  +
   		    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file_1(FileName, ByPassPreP, SearchPaths, TabWidth, FileFormat),
   		    log_errors(FileName, Info),
  -		    {{ok, {AnnAST, Info}}, #state{asts=[{Key, {AnnAST, Info, filelib:last_modified(FileName)}} | ASTs]}}
  +		    {{ok, {AnnAST, Info}}, #state{asts=[{Key, {AnnAST, Info, filehash(FileName)}} | ASTs]}}
   	    end;
   	_ -> 
  +	    NewChecksum = filehash(FileName),
   	    case dets:lookup(TabFile, Key) of
  -		[{Key, {AnnAST, Info, FileModifiedTime}}]->
  -		    case FileModifiedTime >= filelib:last_modified(FileName) of
  -			true -> 
  -			    {{ok, {AnnAST, Info}}, State};
  -			false ->
  -			    {ok, {AnnAST1, Info1}} = refac_util:parse_annotate_file_1(FileName, ByPassPreP, SearchPaths, TabWidth, FileFormat),
  -			    dets:insert(TabFile, {Key, {AnnAST1, Info1, filelib:last_modified(FileName)}}),
  -			    log_errors(FileName, Info1),
  -			    {{ok, {AnnAST1, Info1}}, State}
  -		    end;
  +		[{Key, {AnnAST, Info, Checksum}}] when Checksum =:= NewChecksum->
  +		    {{ok, {AnnAST, Info}}, State};
   		_ ->
  -		    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file_1(FileName, ByPassPreP, SearchPaths, TabWidth, FileFormat),
  -		    dets:insert(TabFile, {Key, {AnnAST, Info, filelib:last_modified(FileName)}}),
  -		    log_errors(FileName, Info),
  -		    {{ok, {AnnAST, Info}}, State}
  +		    {ok, {AnnAST1, Info1}} = refac_util:parse_annotate_file_1(FileName, ByPassPreP, SearchPaths, TabWidth, FileFormat),
  +		    dets:insert(TabFile, {Key, {AnnAST1, Info1, NewChecksum}}),
  +		    log_errors(FileName, Info1),
  +		    {{ok, {AnnAST1, Info1}}, State}
   	    end
       end.
   
  -update_ast_1({Key, {AnnAST, Info, Time}}, _State=#state{dets_tab=TabFile, asts=ASTs}) ->
  +update_ast_1({Key, {AnnAST, Info, _Time}}, _State=#state{dets_tab=TabFile, asts=ASTs}) ->
  +    {FileName, _ByPassPreP, _SearchPaths, _TabWidth, _FileFormat} = Key,
  +    Checksum = filehash(FileName),
       case TabFile of
   	none ->  case lists:keysearch(Key, 1, ASTs) of
   		     {value, {Key,  {_AnnAST1, _Info1, _Time}}} ->  
  -			 #state{asts=lists:keyreplace(Key, 1, ASTs, {Key, {AnnAST, Info, Time}})};
  +			 #state{asts=lists:keyreplace(Key, 1, ASTs, {Key, {AnnAST, Info, Checksum}})};
   		     false ->
  -			 #state{asts=[{Key, {AnnAST, Info, Time}} | ASTs]}
  +			 #state{asts=[{Key, {AnnAST, Info, Checksum}} | ASTs]}
   		 end;
   	_ ->
   	    dets:delete(TabFile, Key),
  -	    dets:insert(TabFile, [{Key, {AnnAST, Info, Time}}])
  +	    dets:insert(TabFile, [{Key, {AnnAST, Info, Checksum}}])
       end.
       
   log_errors(FileName, Info) ->
  
positive.code:     end.
  
  
  
  
negative.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  	 terminate/2, code_change/3]).
  
  -export([start_ast_server/0, get_ast/1, update_ast/2, filehash/1]).
  
  -record(state, {dets_tab=none, asts=[]}).
  
  