added more checks, added --url option