binding: add error handling and conditional delete