turn on extended result codes.
try to print error code so we can see what is going on.