Move dbDisconnect when looping over year within