function to read cookies form file