rhbz965890 refactor long method for source file upload