Fixed run-script jshint
Fixed bytesWritten error