fixed permission issue read/write