Mutex added

Mutex added to avoid the running of duplicated instances