Replaced waitEither with System.timeout