Added @SuppressWarnings to closed stream