handle files with URI for windows & Linux compatibility.
Save JPG with compression = 1.0
refactor