read file before access