rename: (f)demo -> (f)chain
added option for piping into temp file