Fixed upload; added logging for server code