Change unload to use the instance of ChunkWriter

Shouldn't this method be referencing writeStmts instead of ChunkWriter?