Error messages now displayed though code is broken