autoappending jpg extension when saving file