Add options for timeout, maxBuffer