uptimize scanning and error handling