Added more exception catching to client