Refactor out interactive stdin from MainFile creation.