@Override
	public void update() {
		PTStatus oldStatus = status;

		//check file missing
		if (!file.exists() || !file.isFile()) {
			status = PTStatus.MISSING;
		} else {
			lastModified = file.lastModified();
			
			//check file status
			if(status != PTStatus.UPDATING && status != PTStatus.UPLOADING) {			
				long lastModifiedOnServer = ftm.getLastModifiedOnServer(fileId);
				if (lastModifiedOnServer == Globals.PATH_DELETED_ON_SERVER)
					status = PTStatus.DELETEDONSERVER;
				else if(lastModified == lastModifiedOnServer)
					status = PTStatus.UPTODATE;
				else if (lastModified < lastModifiedOnServer)
					status = PTStatus.OLD;
				else if (lastModified > lastModifiedOnServer)
					status = PTStatus.NEW;
			}
		}
		//check if status changed
		if (status != oldStatus) {
			setChanged();
			notifyObservers();
		}
	}