trying out flush command to see output in console of ubuntu and mac