check for valid file extension