better handling of automation extract command to detect fail.

Fix #5