change tab to spaces
improve server code, to name jpeg file with jpg extension