add usage of "with" when reading files