anchor.diff:  						true -> io:format("~s ~s [DIR]\n", [Code, URL]);
   						false -> io:format("~s ~s -> ~s\n", [Code, URL, get_location(Headers)])
   					end
  -			end;
  -		{ok, Code, _, _} -> io:format("~s ~s\n", [Code, URL]);
  -		{error, retry_later} -> timer:sleep(100), try_url(URL, N);
  -		{error, _} when N > 0 -> try_url(URL, N - 1)
  +			end,
  +			Waiter ! finished;
  +		{ok, Code, _, _} -> io:format("~s ~s\n", [Code, URL]), Waiter ! finished;
  +		{error, retry_later} -> timer:sleep(100), try_url(URL, Waiter, N);
  +		{error, _} when N > 0 -> try_url(URL, Waiter, N - 1)
   	end.
   
   get_location([]) -> no_location;
  
positive.code: 	{ok, WordList} = file:open(?WORDLIST, [read, raw, read_ahead, binary]),
  	%%process_flag(trap_exit, true),
  	BaseURL = ensure_ends_with_slash(URL),
  	spawn_worker(BaseURL),
  	NProcs = burst_wordlist(BaseURL, WordList, 1),
  	io:format("~p\n", [NProcs]),
  	wait_for_procs(NProcs),
  	file:close(WordList).
  
  wait_for_procs(0) -> ok;
  wait_for_procs(NProcs) ->
  	receive {'DOWN', _, _, _, _} -> ok end,
  	wait_for_procs(NProcs - 1).
  
  ensure_ends_with_slash(Str) ->
  	case lists:reverse(Str) of
  
negative.code: 		 WithoutSlash -> lists:reverse([$/ | WithoutSlash])
  	end.
  
  burst_wordlist(BaseURL, WordList, Waiter) ->
  	case file:read_line(WordList) of
  		{ok, <<$#, _/binary>>} -> burst_wordlist(BaseURL, WordList, Waiter);
  		{ok, <<$\n>>} -> burst_wordlist(BaseURL, WordList, Waiter);
  		{ok, Line} ->
  			Postfix = binary_to_list(binary:replace(Line, <<$\n>>, <<>>)),
  			Waiter ! started,
  			spawn_worker(BaseURL ++ ibrowse_lib:url_encode(Postfix), Waiter),
  			burst_wordlist(BaseURL, WordList, Waiter);
  		eof -> ok
  	end.
  
  spawn_worker(URL, Waiter) ->
  	spawn_link(dirbusterl, try_url, [URL, Waiter]).
  
  try_url(URL, Waiter) -> try_url(URL, Waiter, ?TRIES).
  try_url(URL, Waiter, N) ->
  	case ibrowse:send_req(URL, [], get, [], [], infinity) of
  		{ok, "404", _, _} -> Waiter ! finished;
  		{ok, Code = [$3 | _], Headers, _} ->
  			Location = get_location(Headers),
  			case get_location(Headers) of
  