bug fixes

1.fixed test application failing to run
2.Implemented check for process already in progress, this way two calls to the plug-in will not cause undefined behaviours when calling the library to do different tasks.