Function complete for logging. No testing has been performed yet