port log() and String.prototype.startsWith() functions