wasm cleanup code
replace 3-state return value by bool type and adding new parameter, pointer to bool flag which return 3rd status