Change how to handle tempfile

Tempfile is removed when exit the block. So ocicasionally tempfile
is removed before send_file method.

So quit to use the block with tempfile and unlink file inside
ensure block.