Added more debugging and log file upload