Implemented server log
Improved database connection handling
Terminating when worker exits