make file size generation script more secure and more compact
add extra checking to load process
check maximum rows in load process
fix memeory free issues
fix out of bound access due to invalid random init