Event occurence check is modified.

From now on, every text file operation is considered as event.
Also added mutex acquire/release operations for single print
operations are considered so.