fix crash (IllegalArgumentException) of example application if a file opened has fewer than 3 characters