Add check for parent process