Improved pcre extension loading
Added logging