throw exception if nothing is read from the file

git-svn-id: https://svn.salilab.org/imp/trunk@17424 e91f8c7b-0e32-4433-a9ac-4502d39a4eab
fix confusion on names with and without extension in C++ examples

git-svn-id: https://svn.salilab.org/imp/trunk@17432 e91f8c7b-0e32-4433-a9ac-4502d39a4eab