File write bug fixes.