Improves Logging and Adds a second checking for link
Improves Logging and Adds a second checking for link