find lib location at beginning