I would propose to only write poses if a filename for it is supplied.