cleaned up nested try/catch blocks in test