Use commons-io to handle stream handling cleanly