Exception handling added in preparation for standalone updating rafactoring.