WIP: check the input file version
WIP: fix compile bug