safe_walk: stat -> status, to avoid shadowing the imported 'stat' module