Added check to prevent upload or printout if compilation failed.