Added errors and exceptions handlers