trying to fix concurrency for end of file cases