Path to images is passed as a function argument.
Removed debbug information.