[bin] adding a print_state at the end of the script