Replace hardcoded service dir with global variable