fixed tag misfunction in writing file