Adding ability to specify timeout.