Added a catch for timeouts