Rework FS.stat to address CI failures