FIX: pending_files does not break if there are no input files