added some error checking for a vaild torrent file