File: Cherry-picked Open implementation.