Using sync and newline when printing text