check that portal file is good first