Added check-error script to check error behaviour.