Write() function now working for r.js optimization.