Testing Error Handling

• Added tests to make sure error handling worked properly
• Fixed associated bugs
• Fixed Closing of redis to wait for a few connections to close