Improve code. Fix the issue of executing batch script.