add error logs. replace regex with simple string operations. add missing public keywords for WEB-8258 +review WEBCR-111