copied from original ntripcaster standard version