Check for command failure and that filename exists.