bd: fixed bug where changed file count was incremented even if no changes were made to the file