added debug feature for mainthread via logcat (Log.d())