Added exception handling for app packaging.