I would like to have the function, including the `if` statement :). It should be a function within `_doExport` context