Log detection errors to log file instead of console