Fixes tempfile on demand debug issues