amended rakefile for possible mongo connection error