Added try-catch for reading images files; included new function to list mask files .jpg or .png in Measure