Making sure to check selects return value and raise if necessary on timeout