Initialize $writer variable to prevent warning in strict mode