Shouldn't 'echo', '>', flagsFile be separate elements, to work with the su join/split logic?