Fixed spelling error in variable name: 'protocall'
Improved error logging

Still need to get rid of some warnings for this to start working.
Don't trap every error, warning, notice, etc.