Enhanced to pass files allowed to access.