implemented file locking on Linux, to prevent multiple applications accessing the same XBee