[BUGFIX] Fix var export return value, prevent output

Fixes an unintentional output variable dump which should be returned as a string.