Moved more of code to try block to catch stop codon (ValueError) exceptions