Saving history to file, motorComplect get ID