read files or stdin and output contents to stdout