small refactoring of fileDescriptor and progressBar