Replaced os.system with wand