Removed a bug in connection but will need to clear the cache when database structure is modified
Added a better log function to basic class obj