add Print function for javascript code debug.