added "total number of invests" to file sink