return tempfile object from fill() method to prevent premature garbage collection