Accept both file name and file object when loading from file