Add a lock file in a standard place and try to acquire it before starting, if we fail to acquire the lock, return an error. Make sure the file is unlocked when the process exit