integrated semaphore communication in control law, may need to switch to regular files manip, not global variables