add -d for debugging and -u option to specify an URL as input