Added catch statements to tests