move grid file retrieval code up into (retried) init code, so that if socket becomes invalid (e.g. happens when mongodb server restart) - we try reconnecting MONGO_MAX_RETRIES_PER_REQUEST times (default 1)