Always use scanner for consisten behaviour, fix NPE
Delete links in separate cycle because of absolute paths