write the entry in linkList if the command was sucessfull and fixed the subprocess.call()