bcf_write: Error message instead of assert + propagate the error up