Added error handling to the C API