ticket 9: made dat file write to uploads dir