adding testing to build and better error checking on failed import