s/out.close/out.end/ for 0.8 compat