implemented file operation counter for pear engine, introduced statistic class to reduce duplicated code