Improve IO with IO.copy_stream and #send_file