Local S3 class so that we do not need the code of BLSBE on the same instance
Use the local S3 class
Also adding some error template