FIX bash command checking pids files issue