Added profiling and moved loading of pictures to be parallel.
Added printout of written files
Parallelized saving of images