this script is write command result to the queue file and load preferentially from it.