Added parameter for logging success