Fix for dev mode file write

The other case also seems to be wrong.