Wrap try/except around some imports