file checker script for checking image file types