Improved element creation error message