1. Added MySQL table name in configuration file

2. Added DEBUG logging finctionality
3. Cleaned up code for performance and stability