Make package error check safe for "/" inside the package string