explicitly close IO instance after read

this should reduce "file descriptor usage" of the
exec input plugin