fix #51, adding much needed error handling to duplicate import names etc