Better checking for available memory when running multiscan