Added error message handling for issue #2.