fixed read file bug