updated print_stat to flush to stdout

statgrab should flush to stdout so it can be used with pipes