added error catching to back-end routines