Replaced sync() method which has been deprecated in hadoop