removed pgrep dependency + fixed already-open issues