Modified error handling logic for VERSION.