Check for file before load.
StyleCop cleanup.
Preserve entity Z order

Fix for issue where entity Z order was not preserved during a copy /
paste or duplicate.
StyleCopy cleanup.