Changed function name to detect() and added IOErrors
Changed function name to detect() and added IOErrors

scottsilverlabs/raspberrystem,scottsilverlabs/raspberrystem,scottsilverlabs/raspberrystem,scottsilverlabs/raspberrystem