Trying new way to get pid even if timeout occurs