sort states & sprites by id ; improve logger