Fix a bug: Can't print stat when Ctrl-C

1. Fix a bug: Can't print stat when Ctrl-C