Partitioned scanning and file management into separate modules