Improved Helpers::loadFromFile() to be more memory effecient