 		}
 
 		public function fileDelete(fileName:String):Boolean {
-			callWrapper(AIRSteam_FileDelete, [fileName]);
+			if(!callWrapper(AIRSteam_FileDelete, [fileName])) return false;
 			return readBoolResponse();
 		}
 
 		public function isCloudEnabledForApp():Boolean {
-			callWrapper(AIRSteam_IsCloudEnabledForApp);
+			if(!callWrapper(AIRSteam_IsCloudEnabledForApp)) return false;
 			return readBoolResponse();
 		}
 
 		public function setCloudEnabledForApp(enabled:Boolean):Boolean {
-			callWrapper(AIRSteam_SetCloudEnabledForApp, [enabled]);
+			if(!callWrapper(AIRSteam_SetCloudEnabledForApp, [enabled])) return false;
 			return readBoolResponse();
 		}
 	}

			}
		}

		private function errorCallback(e:IOErrorEvent):void {
			// the process doesn't accept our input anymore, try to restart it
			if(_process.running) {
				_process.closeInput();
				_process.exit();
			}

			startProcess();
		}

		public function requestStats():Boolean {
			callWrapper(AIRSteam_RequestStats);
			return readBoolResponse();
		}

		public function runCallbacks():Boolean {
			callWrapper(AIRSteam_RunCallbacks);
			return true;
		}

		public function setAchievement(id:String):Boolean {
			callWrapper(AIRSteam_SetAchievement, [id]);
			return readBoolResponse();
		}

		public function clearAchievement(id:String):Boolean {
			callWrapper(AIRSteam_ClearAchievement, [id]);
			return readBoolResponse();
		}

		public function isAchievement(id:String):Boolean {
			callWrapper(AIRSteam_IsAchievement, [id]);
			return readBoolResponse();
		}

		public function getStatInt(id:String):int {
			callWrapper(AIRSteam_GetStatInt, [id]);
			return readIntResponse();
		}

		public function getStatFloat(id:String):Number {
			callWrapper(AIRSteam_GetStatFloat, [id]);
			return readFloatResponse();
		}

		public function setStatInt(id:String, value:int):Boolean {
			callWrapper(AIRSteam_SetStatInt, [id, value]);
			return readBoolResponse();
		}

		public function setStatFloat(id:String, value:Number):Boolean {
			callWrapper(AIRSteam_SetStatFloat, [id, value]);
			return readBoolResponse();
		}

		public function storeStats():Boolean {
			callWrapper(AIRSteam_StoreStats);
			return readBoolResponse();
		}

		public function resetAllStats(bAchievementsToo:Boolean):Boolean {
			callWrapper(AIRSteam_ResetAllStats, [bAchievementsToo]);
			return readBoolResponse();
		}

		public function getFileCount():int {
			callWrapper(AIRSteam_GetFileCount);
			return readIntResponse();
		}

		public function getFileSize(fileName:String):int {
			callWrapper(AIRSteam_GetFileSize, [fileName]);
			return readIntResponse();
		}

		public function fileExists(fileName:String):Boolean {
			callWrapper(AIRSteam_FileExists, [fileName]);
			return readBoolResponse();
		}

		public function fileWrite(fileName:String, data:ByteArray):Boolean {
			callWrapper(AIRSteam_FileWrite, [fileName, data]);
			return readBoolResponse();
		}

		public function fileRead(fileName:String, data:ByteArray):Boolean {
			callWrapper(AIRSteam_FileRead, [fileName]);

			var success:Boolean = readBoolResponse();
			if(success) {

			startProcess();
			if(!_process.running) return false;

			if(!callWrapper(AIRSteam_Init)) return false;
			isReady = readBoolResponse();
			if(isReady) _tm = setInterval(runCallbacks, 100);
			return isReady;
		}

		private function errorCallback(e:IOErrorEvent):void {
			_error = true;
			// the process doesn't accept our input anymore, so just stop it
			clearInterval(_tm);

			if(_process.running) {
				try {
					_process.closeInput();
				} catch(e:*) {
					// no-op
				}

				_process.exit();
			}
		}

		private function callWrapper(funcName:int, params:Array = null):Boolean {
			_error = false;
			if(!_process.running) return false;

			var stdin:IDataOutput = _process.standardInput;
			stdin.writeUTFBytes(funcName + "\n");

			if (params) {
				for(var i:int = 0; i < params.length; ++i) {
					if(params[i] is ByteArray) {
						var length:uint = params[i].length;
						// length + 1 for the added newline
						stdin.writeUTFBytes(String(length + 1) + "\n");
						stdin.writeBytes(params[i]);
						stdin.writeUTFBytes("\n");
					} else {
						stdin.writeUTFBytes(String(params[i]) + "\n");
					}
				}
			}

			return !_error;
		}

		private function waitForData(output:IDataInput):uint {
			while(!output.bytesAvailable) {
				// wait
				if(!_process.running) return 0;
			}

			return output.bytesAvailable;
