Fix rare condition on file size