read file function started