write.html did not check existence of jquery properly