Refactor server stop
Add debug logging
Add AMQP & ActiveRecord checks
Update gemspec