Updated to include new loadFile method