Fix scanner not to conflict with CHDIR