Added code to check for engine timeout