Moved the file scanning code into its own process.
Forgot to commit config code from 98eedaff67648410e9dc5378b09ac43ae6f0be4e.