Change asyncAppendFileWithData: method interface, add toDir and nameGenerator parameter