Added timeout field for config and better error handling for timeouts