Added exception handling during linking code