Hi Prantik,
One line certainly does not look good:
ADN_prefix , sprintf(prefix,"_norm") ,
sprintf should return the number of characters converted, not a
pointer to the string. So the "prefix" address is probably 0x5,
which should generate a seg fault when accessed.
Stick the sprintf() earlier and just pass 'prefix'. Hopefully
that will help...
- rick