Adding content check for txt and png files