check if url is defined
clean up logging