Improved the error checking on network creation.
Merge branch 'test' into dev