Fixes PHP warnings due to vfsStream being destroyed before session
Allow closing session even if write fails