Move lines that don't need to be in try block

I think this is more readable