Attempting to fix writing failure #2