Added function to load scan data from file