Fixed detection of succes in logging