added errors processing