fix async file read in tests