Added a class UnitScaleError to catch errors arising due to scale, and added a test