realize loadFile promise