Protect component names against spaces.
Improve error handling during component import.