added some exception handling for library import