Added order of operations to cwrite. Maybe fixed #2. Although I don't see the problem for #2