improved file read