add autoread and auto write