fixed memory alloc for genoped file