y_run: If True, the action is logged but no file is actually
                        written.
        :return: The path of the file written to.
        r