simplified lib/prereq.php