fix order method issue and add file stats to the program