check_lock

Check to see if the lock exists

Have a max retry count to avoid infinite loops