input from stdin and from a filename on argument