Add batch and fix missing-file bug