prevent semi-initialized cls stub from being visible from another thread (may lead to wrong isValid==false)
prevent semi-initialized file stub from being visible from another thread (may lead to wrong isValid==false)
Error message text corrected
NPE