changed counter var in recordbinary.py and other minor changes