Added input checks for generate_network function. Added dateline version support.