Fixed upload to S3 issue and also some issues in node syntax