Added periodic background routineCheck() function
Fixed bug: background routineCheck() still run when app is active