fixed read/write and rmdir