Javascript code to prevent submissions without source code or output file