wrap mutex around signal file I/O

prevent thread collisions