Delete unused function "streamToArray"