Only start the identity-file-writer if managing state.

Same fix as in master.

(Review request: http://reviews.vapour.ws/r/535/)