fixed bug in lock-in driver (#32) and improved scan error handling