anchor.diff:      {error, closed} ->
         ok = gen_tcp:close(Sock),
         port_command(Port, "0000"),
  -      safe_port_close(Port),
  -      ok;
  +      safe_port_close(Port);
       {error, Reason} ->
         error_logger:error_msg("Client closed socket because: ~p~n", [Reason]),
         ok = gen_tcp:close(Sock),
  
positive.code:   {ok, Data, P2} = read_chunk(Port, Pipe),
    gen_tcp:send(Sock, Data),
    case Data =:= <<"0000">> of
      true ->
        done;
      false ->
        stream_out(Port, Sock, P2)
    end.
    
  read_chunk(Port, Pipe) ->
  
negative.code:   
  file_exists(FullPath) ->
    case file:read_file_info(FullPath) of
      {ok, _Info}      -> true;
      {error, _Reason} -> false
    end.