add tests that are check the key exists in array and opens a read file