Added function to read whole dir, not only files