Exception handling & validation in main lib class