Puts something in the after_build

I’ve built a routine to rename / delete some files accordingly and I am after printing out some messages via puts to understand what is getting done.

Irrespectively I use puts or print, or with or without a stdout.flush or stout.sync, the puts command seems to buffer all my messages, flushing them all in one go while overwriting all of them at the end of the routine and not in line with the execution.

A slight different behaviour this morning when I attempted to return the messages concatenating the string to be outputed with the + rather than using the << or the string interpolation. But I’m not sure this is the real cause.

Any hint?