Added background file scanning.
Fixed code analysis warnings.