[FOLD] Error reporting
[FOLD] remove unused function