bug fixed

fixed a bug where the console would show an extra file because
decrementing was done after the output to the console was written.