Fixed stop task to be based on all pid files (and not just the first). Also, process gets killed only if it exists