fix file upload
minor edit
minor edit
fix sql script