CoreLibrary needs to be linked to pthread and rt libraries
fix string extraction function