renaming write_locale and update custom_levels comment