It turned out that the cause of the problem is a racing condition between the "MESSAGES" command in the LOAD operation and the redirection directive at the tail. Keeping both of them and have both of them pointed to the same file creates a racing condition and caused the delay.
After I discarded one of the two, the problem got solved.