The timeout should probably be configurable