fix bugs (io-error, settings saving)