fix type in filename; use process.stdout in example