StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskWrites() .penaltyLog() //Logs a message to LogCat .build())