extract inputStreamReader into its own value so it is closed by
try-with-resources