better way to refactor core.make-file