Add timeout handling routines