moved file created to seperate thread class