Flush stdout on android
Small fixes while testing directory services