Separating strings and adding flush statement