Add error checking. Also correct grep of ftp urls