Added additional timeout function