add exception handling for loading modules