changed rmdir to rm -r in change_settings