fixed saving config
file permissions checking
docstrings