timeout the while loop after 2 min