Fixed bug when defining link and logfile