Add timeout option

Closes #13