Avoid calling FileChannel#size() over and over since it's slow on Windows