Added: some more condition check to isolate some deadlock
Added: support for 0 prefixing yaf_serial <= 99999 eg: 00001 00002 ...
       00500 00501 .. 99998 99999 100000 100001.