Make sure error will fire before header is written to zip file