Updated Error handling to handle Dividing by Zero.
Also renamed ERROR variable to ERROR_MESSAGE.