Code working with an eroror message