Changed WriteQuests method