fixed bad query parameter in monitor module
fixed handling of errors in monitor main function
improved debug messages in monitor module
Merge pull request #24 from kdmurray91/fix19

Fix #19, solve monitor SQL bug