use try-with-resources for settings