added some try except and decreased count of print