(#127) - Prevent config file corruption on crash

Depends on #132 and #134.