Added duplicate key exception hander