add filename check and fix uint clang error