used global ref to local file in enviar