Added all parameters
Changed setTimeout location to mongoDisconnect()