Fixed problems with invalid descriptor file. Temporary solution: hardcoded 1024 as max descriptor.