Can't change size of file (Errcode: 12 "Cannot allocate memory")