Rewritten to sync upload
Added output
Added output