correct bugs in write e reading setting file