output param can be a directory.