Use with-open in prepate.