Update script to make it more generic and use it for N4 network.