be nice and close filehandles