Fixed counter increment and fixes --path argument.