Clean up os detection before read