additional fork check and enhanced tests