Added checking of prerequisites.