support debugfile switch and global script config