add delete dialog, remove writing file function