Upload file class, some improvements