added get chain real name function
removed link_directory