Now it can deal with any directory.