Improved error messages, and unlink BES *after* it has been used for the last time.