changelog
add safety checks to public C-API