anchor.diff:  		       ok | {error, _}.
   scan_file(ProtoFile,Options) when is_list(ProtoFile) ->
       Basename = filename:basename(ProtoFile, ".proto") ++ "_pb",
  -    {ok,FirstParsed} = parse(ProtoFile),
  +    {ok,String} = parse_file(ProtoFile),
  +    scan_string(String,Basename,Options).
  +    
  +-spec scan_string(String :: string(), Basename :: string(), Options :: list()) ->
  +			 ok | {error, _}. 
  +scan_string(String,Basename,Options) ->
  +    {ok,FirstParsed} = parse_string(String),
       ImportPaths = ["./", "src/" | proplists:get_value(imports_dir, Options, [])],
       Parsed = parse_imports(FirstParsed, ImportPaths),
       Collected = collect_full_messages(Parsed), 
       Messages = resolve_types(Collected#collected.msg,Collected#collected.enum),
       output(Basename, Messages, Collected#collected.enum, Options).
  -
  +    
   %%--------------------------------------------------------------------
   %% @doc Generats a source .erl file and header file .hrl
   %%--------------------------------------------------------------------
  
positive.code: scan_file(ProtoFile) ->
      scan_file(ProtoFile,[]).
  
  %%--------------------------------------------------------------------
  %% @doc Generats a built .beam file and header file .hrl
  %%      Considerd option properties: output_include_dir, 
  
negative.code:     case file:path_open(Path, File, [read]) of
  	{ok, F, Fullname} ->
  	    file:close(F),
  	    {ok,String} = parse_file(Fullname),
  	    {ok,FirstParsed} = parse_string(String),
  	    Parsed = lists:append(FirstParsed, Tail),
  	    parse_imports(Parsed, Path, [Head | Acc]);
  	{error, Error} ->
  