changed block counter index to take into account pid and filename