Changed to multiline error handling