[templating] fix readable file check