file streams are closed explicitly to prevent exceptions on close be suppressed in destructors