Updated enumeration loop to include a timer to prevent a time out.