Add support for custom timeout