Added working configuration writing function