Add reading directory and file functionality