Move integer parse to inside of try block