Add timeout option with tests