to find nth element from last of a string from a given file