Added debug output when the target file has been written.