Revise the read/write bug of g function. Add the option of using phi or not. Revise to output the vo size in KB.