move security config to correct position, fix exception handling
update the data package strategy, update error handling