Removed writing the pre average dataset as it isn't required