Added exception handle