Instead of using [-1] here I would suggest that you use ´.endswith('/')´ instead. Also this would fail if no report url has been specified via an option. So this code should be moved into the below if condition.