Quick change to the while and try statements at the top