fix: too verbose error messages
fix: wrong line number in error messages
check if plug has an element
cleanup
refactoring