Add test for assigning value to error on exit
add -e flag