Readded database check in link cmd