refresh () {
	 am startservice -n com.af.synapse/.lib.ActionService -e json '{ SDirectoryParser: { id:"/sys/devices/system/cpu/cpufreq"}}' &> /dev/null
}

if [ -f $1 ];then
	OLD=`cat $1`
	if [[ ! -z $2 ]]; then
		echo $2 > $1
	fi

	NEW=`cat $1`

	if [ $OLD != $NEW ]; then
		refresh &
	fi

	echo $NEW
fi
