DRY up logpath