More Error checking in modules