Write profile script to a file (oops!)