mag2torrent function