file now determines if tags are input or output
build