Fix caching and check for missing modules