added gcode file close check prefenting error when someone calles stop when it isn't printing