Changed to generic exception catch