more code formating and add saving to mongo GrifFS