Added withopen snippet.