stat filehandle fix