Completely refactor the 'package unknown' handler error handling.