Fix error while scanning data.flg file. Move some functions in *.h for external using.