ahh yes it helped..thanks..i simply did incomplete recovery as follows:

run{
set until sequence thread 1;
duplicate target database to cool;
}

It also changed the DBID of duplicate database. Earlier because of error, the whole script was not getting executed.