modify read file to nonblock