lock access to log file