Fix Bug: Empty chain_file is not nil, so causes errors