Fixed try/catch structure