Merge pull request #11 from 30x/pooja_xapid_854

[XAPID-854] Listen to Apid shutdown, register callback and do a clean shutdown by closing open files