Add Exception handling