If script is run using "set -e" it crashes on lines 177 ((LINE_NUM++)) and 193 ((SECTIONS_NUM++))
This is because post increment returns value (defaulted at 0) before addition and set -e reads this as false, returning error.
Related stackoverflow: here
Fix is easy enough as lines can be changed to use pre-increment ((++LINE_NUM)) and ((++SECTIONS_NUM))