[fix] Verify open return values, prevent NULL deferencing