refacto mongo file structure and addeds delete file management