Added logging and connection pooling