Add function get_words which reads file and add words to array