Save code of spells in log file on application quit.