pass files instead of path