some basic error handling for the scan
fix for content length on thin