added some filesystem stuff and mongo connection