raise error if file is not valid xml