Undefined variable name: scan_file