added better error handling for missing models/controllers