refactor: move os.py to os/file.py
fix sock.close, pass the real socket don't try to dup twice.