many fixes
vtf support
more err check