Added with to open statement