Added check if file is image.