add file checking
add runtime exception if xtc or ndx files are not valid