added -timeout flag, better docs